import req from '@/http/http'
import {getServer} from '@/http/AppApi'

let ZHPQ_SERVER = getServer()

// 特殊人群

// 刑满释放人员
// 修改
export const updateReleasePerson = data => {
  let path = ZHPQ_SERVER + '/releasePerson/' + data.id
  return req.put(path, data)
}
// 删除
export const delReleasePerson = data => {
  let path = ZHPQ_SERVER + '/releasePerson/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const findReleasePerson = param => {
  let path = ZHPQ_SERVER + '/releasePerson'
  return req.get(path, param)
}
// 新增
export const createReleasePerson = data => {
  let path = ZHPQ_SERVER + '/releasePerson/'
  return req.post(path, data)
}
// 查看
export const getReleasePerson = id => {
  let path = ZHPQ_SERVER + '/releasePerson/' + id
  return req.get(path)
}

// 社会矫正人员
// 修改
export const updateCorrector = data => {
  let path = ZHPQ_SERVER + '/corrector/' + data.id
  return req.put(path, data)
}
// 删除
export const delCorrector = data => {
  let path = ZHPQ_SERVER + '/corrector/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const findCorrector = param => {
  let path = ZHPQ_SERVER + '/corrector'
  return req.get(path, param)
}
// 新增
export const createCorrector = data => {
  let path = ZHPQ_SERVER + '/corrector/'
  return req.post(path, data)
}
// 查看
export const getCorrector = id => {
  let path = ZHPQ_SERVER + '/corrector/' + id
  return req.get(path)
}
// 精神障碍患者
// 修改
export const updateMental = data => {
  let path = ZHPQ_SERVER + '/mental/' + data.id
  return req.put(path, data)
}
// 删除
export const delMental = data => {
  let path = ZHPQ_SERVER + '/mental/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const findMental = param => {
  let path = ZHPQ_SERVER + '/mental'
  return req.get(path, param)
}
// 新增
export const createMental = data => {
  let path = ZHPQ_SERVER + '/mental/'
  return req.post(path, data)
}
// 查看
export const getMental = id => {
  let path = ZHPQ_SERVER + '/mental/' + id
  return req.get(path)
}
// 吸毒人员
// 修改
export const updateDrugPerson = data => {
  let path = ZHPQ_SERVER + '/drugPerson/' + data.id
  return req.put(path, data)
}
// 删除
export const delDrugPerson = data => {
  let path = ZHPQ_SERVER + '/drugPerson/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const findDrugPerson = param => {
  let path = ZHPQ_SERVER + '/drugPerson'
  return req.get(path, param)
}
// 新增
export const createDrugPerson = data => {
  let path = ZHPQ_SERVER + '/drugPerson/'
  return req.post(path, data)
}
// 查看
export const getDrugPerson = id => {
  let path = ZHPQ_SERVER + '/drugPerson/' + id
  return req.get(path)
}
// 艾滋病危险人员
// 修改
export const updateAIDS = data => {
  let path = ZHPQ_SERVER + '/aIDS/' + data.id
  return req.put(path, data)
}
// 删除
export const delAIDS = data => {
  let path = ZHPQ_SERVER + '/aIDS/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const findAIDS = param => {
  let path = ZHPQ_SERVER + '/aIDS'
  return req.get(path, param)
}
// 新增
export const createAIDS = data => {
  let path = ZHPQ_SERVER + '/aIDS/'
  return req.post(path, data)
}
// 查看
export const getAIDS = id => {
  let path = ZHPQ_SERVER + '/aIDS/' + id
  return req.get(path)
}
